package test.enba.mq.consumer.rocketmq;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Service
@RocketMQMessageListener(topic = "test-queue", consumerGroup = "my-queue-group")
public class RocketMQConsumer implements RocketMQListener<String> {

  @Override
  public void onMessage(String message) {
    System.out.println("consumer1 Received message: " + message);
    // 处理消息逻辑
  }
}
